﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class cms_default : System.Web.UI.Page
{
    TicketManager tick;

    protected void Page_Load(object sender, EventArgs e)
    {

        tick = new TicketManager((debioscoopEntities)Session["db"]);
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        KaartDetailsView.Visible = true;
        KaartDetailsView.ChangeMode(DetailsViewMode.Insert);
    }

    protected void Button2_Click(object sender, EventArgs e)
    {
        KaartDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
        KaartGridView.SelectedIndex = -1;
    }

    protected void KaartDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
    {
        KaartGridView.DataBind();
    }

    protected void KaartDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
    {
        KaartGridView.DataBind();
    }

    protected void KaartDetailsView_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
    {
        KaartGridView.DataBind();
    }

    protected void Kaart_SelectedIndexChanged(object sender, EventArgs e)
    {
        KaartDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
    }

}